package com.own.component.util.database.exception;

import com.own.base.BaseResponseCode;
import com.own.component.common.exception.BusinessException;
import com.own.component.util.database.em.DatabaseExceptionEnum;

/**
 * DatabaseExceptionEnum
 *
 * @author chenxueli
 * @date 2022-10-15 14:12:49
 */
public class DatabaseException extends BusinessException {

    public DatabaseException() {
        super(DatabaseExceptionEnum.DEFAULT);
    }

    public DatabaseException(String message) {
        super(DatabaseExceptionEnum.DEFAULT.code(), message);
    }

    public DatabaseException(String code, String message) {
        super(code, message);
    }

    public DatabaseException(BaseResponseCode responseCode) {
        super(responseCode);
    }

    public DatabaseException(BaseResponseCode responseCode, Throwable error) {
        super(responseCode, error);
    }

}
